﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartWMS.Server.WarehouseManage.StockManagement.Dto
{
    public class InWarehouseListDto
    {
        /// <summary>
        /// 入库编号
        /// </summary>
        public string? WarehousingCode { get; set; }

        /// <summary>
        /// 入库单类型
        /// </summary>
        public int WarehousingType { get; set; }

        /// <summary>
        /// 入库单类型名称
        /// </summary>
        public string WarehousingTypeName { get { 
                if(WarehousingType==1)
                {
                    return "采购收货入库";
                }
                else if(WarehousingType==2)
                {
                    return "销售退货入库";
                }
                else if(WarehousingType==3)
                {
                    return "生产产品入库";
                }
                else if(WarehousingType==4)
                {
                    return "领用退还入库";
                }
                else if(WarehousingType==5)
                {
                    return "借货入库";
                }
                else
                {
                    return "借出还入";
                }
            } }

        ///<summary>
        /// 审核状态
        /// </summary>
        public int State { get; set; }

        /// <summary>
        /// 审核状态名称
        /// </summary>
        public string StateName { get { 
                if(State==1)
                {
                    return "未审核";
                }
                else if(State==2)
                {
                    return "已审核";
                }
                else if(State==0)
                {
                    return "未审核";
                }
                else
                {
                    return "已作废";
                }
            } }

        /// <summary>
        /// 供应商编号
        /// </summary>
        public string? SupplierCode { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        public string? SupplierName { get; set; }

        /// <summary>
        /// 供应商联系人
        /// </summary>
        public string? Contract { get; set; }

        /// <summary>
        /// 供应商电话
        /// </summary>
        public string? Phone { get; set; }

        ///<summary>
        /// 添加人
        /// </summary>
        public string? Creator { get; set; }

        ///<summary>
        /// 审核时间
        /// </summary>
        public DateTime Audittime { get; set; }


        ///<summary>
        /// 备注
        /// </summary>
        [MaxLength(200)]
        public string? Remarks { get; set; }


        ///<summary>
        /// 审核意见
        /// </summary>
        [MaxLength(200)]
        public string? Opinion { get; set; }
    }
}
